package create;

public class BothRunableThread extends Thread implements Runnable {

	@Override
	public void run() {
		System.out.println("我来实现run方法");
	}

	public static void main(String[] args) {
		Thread thread = new Thread(
				new Runnable() {
			@Override
			public void run() {
				System.out.println("我来自runnable的实现implements");
			}
		}) {
			@Override
			public void run() {
				System.out.println("我来自Thread的继承重写extend");
			}
		};
		thread.start();
	}
}
